/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package resource_builder;

import com.hitechbangla.fctu.base.aircraft.AircraftTurnDegree;
import com.hitechbangla.fctu.base.aircraft.AircraftType;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author moon
 */
public class AircraftTypeBuilder 
{ 
    public static void main(String a[]) 
    {
         AircraftType aircraftType1 = new AircraftType("F16", 360, 50, 2000, new AircraftTurnDegree(1.1f,6.0f, 2.2f), .4f);
         AircraftType aircraftType2 = new AircraftType("Mig29", 600, 100, 3000, new AircraftTurnDegree(3f,8.0f, 4f), .4f);
         AircraftType aircraftType3 = new AircraftType("F35", 600, 100, 3000, new AircraftTurnDegree(3f,8.0f, 4f), .4f);
	 
         List<AircraftType> listAircraftType = new ArrayList<AircraftType>();
         listAircraftType.add(aircraftType1);
         listAircraftType.add(aircraftType2); 
	 listAircraftType.add(aircraftType3); 
         
         try
         {
            FileOutputStream fileOutputStream = new FileOutputStream("src/resources/aircraftType.object");
            ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);
            objectOutputStream.writeObject(listAircraftType);         
            objectOutputStream.flush();
            objectOutputStream.close();
         }
         catch(Exception ex)
         {
             //System.out.println(ex.toString());
         }         
    }
}
